#include "process.h"

#define N 101
#define STYLE '='

void process()
{
    char buffer[N];
    memset(buffer, 0, sizeof(buffer));
    int cnt = 0;
    const char* lable = "|/-\\";
    while(cnt <= 100)
    {
        printf("[%-100s][%d%%][%c]\r", buffer, cnt, lable[cnt % 4]);
        fflush(stdout);
        buffer[cnt++] = STYLE;
        usleep(50000);
    }
    printf("\n");
}
